package kr.hkit.powerjava.chapter07.test;

import java.util.Scanner;

public class Jogun1 {
	public static void main(String[] args) {

		int a = 100;
		int x;
		int b = 0;

		Scanner in = new Scanner(System.in);
		System.out.println("구매 갯수를 입력하시오 : ");
		x = in.nextInt();

		if (x >= 100) {
			b = (int) (x * a * 0.8);
		} else {
			if (x >= 20) {
				b = (int) (x * a * 0.85);
			} else {
				if (x >= 10) {
					b = (int) (x * a * 0.9);
				} else {
					b = x * a;
				}
			}
		}
		System.out.println(b + "원입니다");
	}

}

/*
 * if (x >= 100) System.out.println(b * 0.8 + "원입니다");
 * 
 * else if (x >= 20) System.out.println(b * 0.85 + "원입니다");
 * 
 * else if (x >= 10) System.out.println(b * 0.9 + "원입니다"); else
 * System.out.println(b + "원입니다");
 */